package com.cqnu.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cqnu.dao.MenuDao;
import com.cqnu.entity.Menu;
import com.cqnu.service.IMenuService;
@Service("menuService")
public class MenuServiceImpl extends BaseServiceImpl implements IMenuService{

	@Resource
	private MenuDao menuDao;
	
	@Override
	public List<Menu> find(Map<String, Object> map) {
		return menuDao.find(map);
	}

	@Override
	public Long getTotal(Map<String, Object> map) {
		return menuDao.getTotal(map);
	}
	
	@Override
	public int update(Menu obj) {
		return menuDao.update(obj);
	}

	@Override
	public int add(Menu obj) {
		return menuDao.add(obj);
	}

	@Override
	public int delete(Integer id) {
		return menuDao.delete(id);
	}
	
	public List<Menu> getMenuByRole(Map<String, Object> map){
		return extraDAO.getMenuByRole(map);
	}

	@Override
	public Menu getById(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

}
